package com.shooker.factory.abstractfactory;

import com.shooker.factory.abstractfactory.service.ICommand;
import com.shooker.factory.abstractfactory.service.IConnection;
import com.shooker.factory.abstractfactory.service.IDataBaseUtils;
import com.shooker.factory.abstractfactory.util.MySqlDataBaseUtil;
import com.shooker.factory.abstractfactory.util.OracleDataBaseUtil;

public class AbstractFactoryTest {

    public static void main(String[] args) {

        IDataBaseUtils oracleDataBaseUtil =new OracleDataBaseUtil();
        IConnection iConnection = oracleDataBaseUtil.getConnection();
        iConnection.connect();
        ICommand iCommand = oracleDataBaseUtil.getCommand();
        iCommand.command();

        IDataBaseUtils mysqlDataBaseUtil = new MySqlDataBaseUtil();
        IConnection mysqlConnection = mysqlDataBaseUtil.getConnection();
        mysqlConnection.connect();
        ICommand mysqlCommand = mysqlDataBaseUtil.getCommand();
        mysqlCommand.command();
    }
}
